Skip to main content

constantMask

Type

property

Summary

Specifies whether animated GIFs ignore changes in the mask data when displaying the GIF.

Syntax

set the constantMask of <image> to {true | false}

Description

Use the constantMask property to enable display of certain animated GIF images.

Some animated GIF images use an optimization technique in which the mask data is used to hold information about differences between successive frames. When played, these GIFs can have display problems because the mask data is being used in a non-standard way. Set the constantMask to true to correct the problem with these GIFs.

Setting the constantMask to true may have some undesirable side effects--the image's appearance may be incorrect if you move it while the animation is playing, or if there is an object underneath it--so use this property only when necessary.

note

If the constantMask is set to true, clicking a transparent portion of a frame may unexpectedly send messages such as mouseUp to the image, instead of the object underneath the image. This is because when deciding whether the user has clicked a transparent pixel, LiveCode uses the masks for all the frames, rather than for the current frame, if the constantMask is true.

Important

Setting an image's constantMask property to true can cause problems with the image's appearance if you move it under script control while the animation is playing, or if there's an object underneath it. Avoid setting the constantMask property to true unless necessary.

Examples

set the constantMask of image "Demo" to true

glossary: object, property, animated GIF, frame, GIF, pixel, mask, message

keyword: image

message: mouseUp

object: image

property: filename, script, imagePixmapID, alwaysBuffer, constantMask

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?